﻿//这个类主要用于一把剑的绘制
//author 夏天的树人
//vesion 1.0

package org.summerTree.graphics
{
	import flash.display.Sprite;

	public class Sword extends Base 
	{		 
		public var angle:Number=0;
		private var array:Array=[[50,0],
								[50,50],
								[20,50],
								[20,60],
								[45,60],
								[45,300],
								[65,330],
								[75,300],
								[75,60],
								[100,60],
								[100,50],
								[70,50],
								[70,0],
								[50,0]];
		//private var LineColor:uint=0x000000;//默认是白色
		public function Sword()
		{
			init();
		}
		private function init():void
		{
			 
			this.graphics.lineStyle(1,color);
			this.graphics.moveTo(array[0][0],array[0][1]);
			for (var i:int=0; i < array.length; i++)
			{
				this.graphics.lineTo(array[i][0],array[i][1]);
			}
			this.graphics.drawCircle(60,-11,12);//绘制剑中心
			this.graphics.drawCircle(60,60,14);
			this.graphics.beginFill(0x000000);
			this.graphics.drawCircle(60,60,5);
			this.graphics.endFill();
			this.graphics.moveTo(60,60);
			this.graphics.lineTo(65,330);
			this.scaleX=this.scaleY=0.5;
		}
		////设置颜色
//		public function set color(value:uint):void
//		{
//			this.LineColor=value;
//		}
//		//获取颜色
//		public function get color():uint
//		{
//			return this.LineColor;
//		}

//清除图像
		//public function clear():void
//		{
//			this.graphics.clear();
//		}
	}
}